// pages/myImg/myImgs.js
Page({

  
  data: {
    myImgsReslut: null
  },
 
  getMyImgs: function () {
    wx.showLoading({
      title: 'loading',
    })
    const that = this;
    wx.request({
      url: 'https://www.aivin666.cn/AivinInfo/getAllPicInfoGson?pageNum=2',
      success: function (res) {
        that.setData({
          myImgsReslut: res.data
        });
        wx.hideLoading();
      }
    })
  },


   
  onLoad: function (options) {
    this.getMyImgs(); 
  },

 

  previewImage: function (event) {
   
   // 传值的时候 注意命名，建议全部用小写。否则会出现undefined错误
    var allpics = event.currentTarget.dataset.allpics; 
    var imgArray = [];
    for (var i = 0; i < allpics.length; i++){
      imgArray.push(allpics[i].picUrl);
    }

    wx.previewImage({
      current: event.currentTarget.dataset.picsrc,
      urls: imgArray
    })
  
  }  ,


 
  onReady: function () {
  
  },

  onShow: function () {
  
  },
 
  onHide: function () {
  
  },
 
  onUnload: function () {
  
  },

   
  onPullDownRefresh: function () {
  
  },
 
  onReachBottom: function () {
  
  },

   
  onShareAppMessage: function () {
  
  }
})